del %1.gss

:dotablo
tablo -sti t%1.sti
REM (demo) .\tablodm -sti t%1.sti
if errorlevel 1 goto taberror
if exist %1.gss goto dogemsim
goto taberror

:dogemsim
del %1.sl*
gemsim -cmf %1.cmf
REM (demo) .\gemsimdm -cmf %1.cmf
REM - do by hand (does not work well) viewsol %1.sl4
if errorlevel 1 goto gserror
if exist %1.sl4 goto doneok
goto gserror

:taberror
@echo off
echo .
echo There was an error running TABLO
echo .
goto end

:gserror
@echo off
echo .
echo There was an error running GEMSIM
echo .
goto end

:doneok
@echo off
echo .
echo Seems to have run ok
echo .
goto end

:end


